package cfdt.ldl.dspchannel.api.feign.fallback;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import cfdt.ldl.dspchannel.api.feign.DspChannelFeign;
import feign.hystrix.FallbackFactory;

@Component
public class DspChannelFeignFallBackFactory implements FallbackFactory<DspChannelFeign>{
    private final Logger logger = LoggerFactory.getLogger(getClass().getName());

    public DspChannelFeign create(Throwable throwable) {
        logger.error("请求大数据通道异常", throwable);
        return new DspChannelFeignFallBack();
    }
}
